﻿namespace ExamV5.PaperInfo
{
    using ExamV5;
    using System;
    using System.Configuration;
    using System.Data;
    using System.Data.SqlClient;
    using System.Web;
    using System.Web.UI;
    using System.Web.UI.HtmlControls;
    using System.Web.UI.WebControls;

    public class PrintPaperInfo : Page
    {
        protected GridView DataGridA;
        protected GridView DataGridB;
        protected GridView DataGridC;
        protected GridView DataGridD;
        protected GridView DataGridE;
        protected GridView DataGridF;
        protected GridView DataGridG;
        protected GridView DataGridH;
        protected GridView DataGridI;
        protected GridView DataGridJ;
        protected HtmlForm form1;
        protected HtmlHead Head1;
        private HttpCookie httpCookie_0 = null;
        private HttpCookie httpCookie_1 = null;
        private HttpCookie httpCookie_2 = null;
        private HttpCookie httpCookie_3 = null;
        private int int_0 = 0;
        protected int intTmp = 0;
        protected Label labATitle;
        protected Label labBTitle;
        protected Label labCTitle;
        protected Label labDTitle;
        protected Label labETitle;
        protected Label labExamName;
        protected Label labFTitle;
        protected Label labGTitle;
        protected Label labHeadInfo;
        protected Label labHTitle;
        protected Label labITitle;
        protected Label labJTitle;
        protected Label labSubjectName;
        protected Label labSumFen;
        protected Label labSumTime;
        private PublicFun publicFun_0 = new PublicFun();

        private string method_0(string string_0)
        {
            string str = "";
            for (int i = 1; i <= this.intTmp; i++)
            {
                switch (i)
                {
                    case 1:
                    {
                        if (string_0 == "A")
                        {
                            break;
                        }
                        str = str + "<td width=60 align='center'>&nbsp; &nbsp;</td>";
                        continue;
                    }
                    case 2:
                    {
                        if (string_0 == "A")
                        {
                            goto Label_0097;
                        }
                        str = str + "<td width=60 align='center'>&nbsp; &nbsp;</td>";
                        continue;
                    }
                    case 3:
                    {
                        if (string_0 == "A")
                        {
                            goto Label_00C9;
                        }
                        str = str + "<td width=60 align='center'>&nbsp; &nbsp;</td>";
                        continue;
                    }
                    case 4:
                    {
                        if (!(string_0 == "A"))
                        {
                            goto Label_00FB;
                        }
                        str = str + "<td width=60 align='center'>四</td>";
                        continue;
                    }
                    case 5:
                    {
                        if (string_0 == "A")
                        {
                            goto Label_012D;
                        }
                        str = str + "<td width=60 align='center'>&nbsp; &nbsp;</td>";
                        continue;
                    }
                    case 6:
                    {
                        if (!(string_0 == "A"))
                        {
                            goto Label_015F;
                        }
                        str = str + "<td width=60 align='center'>六</td>";
                        continue;
                    }
                    case 7:
                    {
                        if (string_0 == "A")
                        {
                            goto Label_0191;
                        }
                        str = str + "<td width=60 align='center'>&nbsp; &nbsp;</td>";
                        continue;
                    }
                    case 8:
                    {
                        if (!(string_0 == "A"))
                        {
                            goto Label_01C0;
                        }
                        str = str + "<td width=60 align='center'>八</td>";
                        continue;
                    }
                    case 9:
                    {
                        if (!(string_0 == "A"))
                        {
                            goto Label_01EC;
                        }
                        str = str + "<td width=60 align='center'>九</td>";
                        continue;
                    }
                    case 10:
                    {
                        if (!(string_0 == "A"))
                        {
                            goto Label_0218;
                        }
                        str = str + "<td width=60 align='center'>十</td>";
                        continue;
                    }
                    default:
                    {
                        continue;
                    }
                }
                str = str + "<td width=60 align='center'>一</td>";
                continue;
            Label_0097:
                str = str + "<td width=60 align='center'>二</td>";
                continue;
            Label_00C9:
                str = str + "<td width=60 align='center'>三</td>";
                continue;
            Label_00FB:
                str = str + "<td width=60 align='center'>&nbsp; &nbsp;</td>";
                continue;
            Label_012D:
                str = str + "<td width=60 align='center'>五</td>";
                continue;
            Label_015F:
                str = str + "<td width=60 align='center'>&nbsp; &nbsp;</td>";
                continue;
            Label_0191:
                str = str + "<td width=60 align='center'>七</td>";
                continue;
            Label_01C0:
                str = str + "<td width=60 align='center'>&nbsp; &nbsp;</td>";
                continue;
            Label_01EC:
                str = str + "<td width=60 align='center'>&nbsp; &nbsp;</td>";
                continue;
            Label_0218:
                str = str + "<td width=60 align='center'>&nbsp; &nbsp;</td>";
            }
            return str;
        }

        private string method_1(int int_1)
        {
            switch (int_1)
            {
                case 1:
                    return "一、";

                case 2:
                    return "二、";

                case 3:
                    return "三、";

                case 4:
                    return "四、";

                case 5:
                    return "五、";

                case 6:
                    return "六、";

                case 7:
                    return "七、";

                case 8:
                    return "八、";

                case 9:
                    return "九、";

                case 10:
                    return "十、";
            }
            return "";
        }

        private void method_10(string string_0)
        {
            int num2;
            this.DataGridG.Visible = true;
            int num = 0;
            string str = "Select ID,SubjectID,RubricType,RubricTitle,OptionAnswer  from RubricInfo ";
            string str2 = "";
            string[] strArray = string_0.Split(new char[] { '#' });
            if (strArray.Length > 0)
            {
                for (num2 = 0; num2 < strArray.Length; num2++)
                {
                    if (str2.Length > 0)
                    {
                        str2 = str2 + " or ID='" + strArray[num2] + "'";
                    }
                    else
                    {
                        str2 = " where ID='" + strArray[num2] + "'";
                    }
                }
            }
            SqlConnection selectConnection = new SqlConnection(ConfigurationManager.ConnectionStrings["Conn"].ConnectionString);
            SqlDataAdapter adapter = new SqlDataAdapter(str + str2, selectConnection);
            DataSet dataSet = new DataSet();
            adapter.Fill(dataSet, "TRubric");
            this.DataGridG.DataSource = dataSet.Tables["TRubric"].DefaultView;
            this.DataGridG.DataBind();
            for (num2 = 0; num2 < this.DataGridG.Rows.Count; num2++)
            {
                num++;
                Label label = (Label) this.DataGridG.Rows[num2].FindControl("labGDataTitle");
                label.Text = num.ToString() + "、" + label.Text.ToString();
                Label label2 = (Label) this.DataGridG.Rows[num2].FindControl("labChooseDataG");
                label2.Text = "答：<br><br><br><br><br><br><br><br><br><br>";
            }
            adapter.Dispose();
            dataSet.Clear();
            dataSet.Dispose();
            selectConnection.Close();
            selectConnection.Dispose();
        }

        private void method_11(string string_0)
        {
            int num2;
            this.DataGridH.Visible = true;
            int num = 0;
            string str = "Select ID,SubjectID,RubricType,RubricTitle,OptionAnswer  from RubricInfo ";
            string str2 = "";
            string[] strArray = string_0.Split(new char[] { '#' });
            if (strArray.Length > 0)
            {
                for (num2 = 0; num2 < strArray.Length; num2++)
                {
                    if (str2.Length > 0)
                    {
                        str2 = str2 + " or ID='" + strArray[num2] + "'";
                    }
                    else
                    {
                        str2 = " where ID='" + strArray[num2] + "'";
                    }
                }
            }
            SqlConnection selectConnection = new SqlConnection(ConfigurationManager.ConnectionStrings["Conn"].ConnectionString);
            SqlDataAdapter adapter = new SqlDataAdapter(str + str2, selectConnection);
            DataSet dataSet = new DataSet();
            adapter.Fill(dataSet, "ANRubric");
            this.DataGridH.DataSource = dataSet.Tables["ANRubric"].DefaultView;
            this.DataGridH.DataBind();
            for (num2 = 0; num2 < this.DataGridH.Rows.Count; num2++)
            {
                num++;
                Label label = (Label) this.DataGridH.Rows[num2].FindControl("labHDataTitle");
                label.Text = num.ToString() + "、" + label.Text.ToString();
                Label label2 = (Label) this.DataGridH.Rows[num2].FindControl("labChooseDataH");
                label2.Text = "答：<br><br><br><br><br><br><br><br><br><br>";
            }
            adapter.Dispose();
            dataSet.Clear();
            dataSet.Dispose();
            selectConnection.Close();
            selectConnection.Dispose();
        }

        private void method_12(string string_0)
        {
            int num2;
            this.DataGridI.Visible = true;
            int num = 0;
            string str = "Select ID,SubjectID,RubricType,RubricTitle,OptionAnswer  from RubricInfo ";
            string str2 = "";
            string[] strArray = string_0.Split(new char[] { '#' });
            if (strArray.Length > 0)
            {
                for (num2 = 0; num2 < strArray.Length; num2++)
                {
                    if (str2.Length > 0)
                    {
                        str2 = str2 + " or ID='" + strArray[num2] + "'";
                    }
                    else
                    {
                        str2 = " where ID='" + strArray[num2] + "'";
                    }
                }
            }
            SqlConnection selectConnection = new SqlConnection(ConfigurationManager.ConnectionStrings["Conn"].ConnectionString);
            SqlDataAdapter adapter = new SqlDataAdapter(str + str2, selectConnection);
            DataSet dataSet = new DataSet();
            adapter.Fill(dataSet, "IRubric");
            this.DataGridI.DataSource = dataSet.Tables["IRubric"].DefaultView;
            this.DataGridI.DataBind();
            for (num2 = 0; num2 < this.DataGridI.Rows.Count; num2++)
            {
                num++;
                Label label2 = (Label) this.DataGridI.Rows[num2].FindControl("labIDataTitle");
                label2.Text = num.ToString() + "、" + label2.Text.ToString();
                Label label = (Label) this.DataGridI.Rows[num2].FindControl("labChooseDataI");
                if (label.Text.Length > 6)
                {
                    label.Text = "&nbsp;&nbsp;&nbsp;&nbsp;<font color='red'>注:</font><a href='../FrmDownLoad.aspx?FileName=" + label.Text + "' target='_blank'>下载原题</a>";
                }
            }
            adapter.Dispose();
            dataSet.Clear();
            dataSet.Dispose();
            selectConnection.Close();
            selectConnection.Dispose();
        }

        private void method_13(string string_0, string string_1)
        {
            int num2;
            this.DataGridJ.Visible = true;
            int num = 0;
            string str = "Select ID,SubjectID,RubricType,RubricTitle,OptionAnswer  from RubricInfo ";
            string str2 = "";
            string[] strArray = string_1.Split(new char[] { '_' });
            string[] strArray2 = string_0.Split(new char[] { '#' });
            if (strArray2.Length > 0)
            {
                for (num2 = 0; num2 < strArray2.Length; num2++)
                {
                    if (str2.Length <= 0)
                    {
                        str2 = " where ID='" + strArray2[num2] + "'";
                    }
                    else
                    {
                        str2 = str2 + " or ID='" + strArray2[num2] + "'";
                    }
                }
            }
            SqlConnection selectConnection = new SqlConnection(ConfigurationManager.ConnectionStrings["Conn"].ConnectionString);
            SqlDataAdapter adapter = new SqlDataAdapter(str + str2, selectConnection);
            DataSet dataSet = new DataSet();
            adapter.Fill(dataSet, "JRubric");
            this.DataGridJ.DataSource = dataSet.Tables["JRubric"].DefaultView;
            this.DataGridJ.DataBind();
            for (num2 = 0; num2 < this.DataGridJ.Rows.Count; num2++)
            {
                num++;
                Label label = (Label) this.DataGridJ.Rows[num2].FindControl("labJDataTitle");
                label.Text = num.ToString() + "、<font color='#ff0000'>说明:此题每项/空" + strArray[num2] + "分</font><br>" + label.Text.ToString();
                Label label2 = (Label) this.DataGridJ.Rows[num2].FindControl("labChooseDataJ");
                label2.Text = "<br><br><br><br><br><br><br><br><br><br><br><br>";
            }
            adapter.Dispose();
            dataSet.Clear();
            dataSet.Dispose();
            selectConnection.Close();
            selectConnection.Dispose();
        }

        private void method_2()
        {
            int num = 0;
            string cmdText = "select ParmName from SysParmInfo where ParmMemo='RubricType' order by ParmValue";
            SqlConnection connection = new SqlConnection(ConfigurationManager.ConnectionStrings["Conn"].ConnectionString);
            connection.Open();
            SqlDataReader reader = new SqlCommand(cmdText, connection).ExecuteReader(CommandBehavior.CloseConnection);
            while (reader.Read())
            {
                switch (num)
                {
                    case 0:
                        this.labATitle.Text = reader["ParmName"].ToString();
                        break;

                    case 1:
                        this.labBTitle.Text = reader["ParmName"].ToString();
                        break;

                    case 2:
                        this.labCTitle.Text = reader["ParmName"].ToString();
                        break;

                    case 3:
                        this.labDTitle.Text = reader["ParmName"].ToString();
                        break;

                    case 4:
                        this.labETitle.Text = reader["ParmName"].ToString();
                        break;

                    case 5:
                        this.labFTitle.Text = reader["ParmName"].ToString();
                        break;

                    case 6:
                        this.labGTitle.Text = reader["ParmName"].ToString();
                        break;

                    case 7:
                        this.labHTitle.Text = reader["ParmName"].ToString();
                        break;

                    case 8:
                        this.labITitle.Text = reader["ParmName"].ToString();
                        break;

                    case 9:
                        this.labJTitle.Text = reader["ParmName"].ToString();
                        break;
                }
                num++;
            }
            if (this.labATitle.Text.Trim() == "")
            {
                this.labATitle.Text = "单选题";
            }
            if (this.labBTitle.Text.Trim() == "")
            {
                this.labBTitle.Text = "多选题";
            }
            if (this.labCTitle.Text.Trim() == "")
            {
                this.labCTitle.Text = "判断题";
            }
            if (this.labDTitle.Text.Trim() == "")
            {
                this.labDTitle.Text = "填空题";
            }
            if (this.labETitle.Text.Trim() == "")
            {
                this.labETitle.Text = "简答题";
            }
            if (this.labFTitle.Text.Trim() == "")
            {
                this.labFTitle.Text = "作文题";
            }
            if (this.labGTitle.Text.Trim() == "")
            {
                this.labGTitle.Text = "论述题";
            }
            if (this.labHTitle.Text.Trim() == "")
            {
                this.labHTitle.Text = "分析题";
            }
            if (this.labITitle.Text.Trim() == "")
            {
                this.labITitle.Text = "操作题";
            }
            if (this.labJTitle.Text.Trim() == "")
            {
                this.labJTitle.Text = "综合题";
            }
            reader.Close();
            connection.Close();
            connection.Dispose();
        }

        private void method_3()
        {
            string str2 = "";
            string str3 = "";
            string str4 = "";
            string str5 = "";
            string str6 = "";
            string str7 = "";
            string str8 = "";
            string str9 = "";
            string str10 = "";
            string str11 = "";
            string str12 = "";
            string str13 = "";
            string str14 = "";
            SqlConnection connection = new SqlConnection(ConfigurationManager.ConnectionStrings["Conn"].ConnectionString);
            connection.Open();
            SqlCommand command = new SqlCommand("select a.ExamName,a.SubjectName,a.PaperFen,a.ExamTime,a.RubricDist,a.FenDist,a.MemoDist,b.RubricS,b.RubricD,b.RubricB,b.RubricF,b.RubricA,b.RubricC,b.RubricT,b.RubricAN,b.RubricO,b.RubricJ  from PaperInfo a ,PaperData b where a.ID=b.PaperID and a.ID=" + this.int_0, connection);
            SqlDataReader reader = command.ExecuteReader(CommandBehavior.CloseConnection);
            if (reader.Read())
            {
                this.labExamName.Text = reader["ExamName"].ToString();
                this.labSubjectName.Text = "科目:" + reader["SubjectName"].ToString();
                this.labSumFen.Text = "总分:" + reader["PaperFen"].ToString();
                this.labSumTime.Text = "时长:" + reader["ExamTime"].ToString() + "分钟";
                str2 = reader["RubricDist"].ToString();
                str3 = reader["FenDist"].ToString();
                str4 = reader["MemoDist"].ToString();
                str5 = reader["RubricS"].ToString();
                str6 = reader["RubricD"].ToString();
                str7 = reader["RubricB"].ToString();
                str8 = reader["RubricF"].ToString();
                str9 = reader["RubricA"].ToString();
                str10 = reader["RubricC"].ToString();
                str11 = reader["RubricT"].ToString();
                str12 = reader["RubricAN"].ToString();
                str13 = reader["RubricO"].ToString();
                str14 = reader["RubricJ"].ToString();
            }
            reader.Close();
            reader.Dispose();
            command.Dispose();
            connection.Close();
            connection.Dispose();
            string[] strArray = str2.Split(new char[] { '#' });
            string[] strArray3 = str3.Split(new char[] { '#' });
            string[] strArray2 = str4.Split(new char[] { '#' });
            if (strArray.Length <= 1)
            {
                base.Response.Write("<script>alert('没有找到相关数据！')</script>");
            }
            else
            {
                if (strArray[0] != "0")
                {
                    this.intTmp++;
                    this.labATitle.Visible = true;
                    this.labATitle.Text = "<table  cellSpacing=0 cellPadding=4 border='1' bordercolordark='#ffffff' bordercolorlight='#000000'><tr><td width=80 align='center'><b>评分人</b></td><td width=60 align='center'><b>得分</b></td></tr><tr><td width=80 align='center'>&nbsp; &nbsp;</td><td width=60 align='center'>&nbsp; &nbsp;</td></tr></table><br><b>" + this.method_1(this.intTmp) + this.labATitle.Text + "</b>&nbsp;&nbsp;&nbsp;&nbsp;(共<font color='#ff0000'>" + strArray[0] + "</font>题,每题<font color='#ff0000'>" + strArray3[0] + "</font>分,说明:" + strArray2[0] + ")<br><br>";
                    this.method_4(str5);
                }
                if (strArray[1] != "0")
                {
                    this.intTmp++;
                    this.labBTitle.Visible = true;
                    this.labBTitle.Text = "<br><br><table  cellSpacing=0 cellPadding=4  border='1' bordercolordark='#ffffff' bordercolorlight='#000000'><tr><td width=80 align='center'><b>评分人</b></td><td width=60 align='center'><b>得分</b></td></tr><tr><td width=80 align='center'>&nbsp; &nbsp;</td><td width=60 align='center'>&nbsp; &nbsp;</td></tr></table><br><b>" + this.method_1(this.intTmp) + this.labBTitle.Text + "</b>&nbsp;&nbsp;&nbsp;&nbsp;(共<font color='#ff0000'>" + strArray[1] + "</font>题,每题<font color='#ff0000'>" + strArray3[1] + "</font>分,说明:" + strArray2[1] + ")<br><br>";
                    this.method_5(str6);
                }
                if (strArray[2] != "0")
                {
                    this.intTmp++;
                    this.labCTitle.Visible = true;
                    this.labCTitle.Text = "<br><br><table  cellSpacing=0 cellPadding=4  border='1' bordercolordark='#ffffff' bordercolorlight='#000000'><tr><td width=80 align='center'><b>评分人</b></td><td width=60 align='center'><b>得分</b></td></tr><tr><td width=80 align='center'>&nbsp; &nbsp;</td><td width=60 align='center'>&nbsp; &nbsp;</td></tr></table><br><b>" + this.method_1(this.intTmp) + this.labCTitle.Text + "</b>&nbsp;&nbsp;&nbsp;&nbsp;(共<font color='#ff0000'>" + strArray[2] + "</font>题,每题<font color='#ff0000'>" + strArray3[2] + "</font>分,说明:" + strArray2[2] + ")<br><br>";
                    this.method_6(str7);
                }
                if (strArray[3] != "0")
                {
                    this.intTmp++;
                    this.labDTitle.Visible = true;
                    this.labDTitle.Text = "<br><br><table  cellSpacing=0 cellPadding=4  border='1' bordercolordark='#ffffff' bordercolorlight='#000000'><tr><td width=80 align='center'><b>评分人</b></td><td width=60 align='center'><b>得分</b></td></tr><tr><td width=80 align='center'>&nbsp; &nbsp;</td><td width=60 align='center'>&nbsp; &nbsp;</td></tr></table><br><b>" + this.method_1(this.intTmp) + this.labDTitle.Text + "</b>&nbsp;&nbsp;&nbsp;&nbsp;(共<font color='#ff0000'>" + strArray[3] + "</font>题,每题<font color='#ff0000'>" + strArray3[3] + "</font>分,说明:" + strArray2[3] + ")<br><br>";
                    this.method_7(str8);
                }
                if (strArray[4] != "0")
                {
                    this.intTmp++;
                    this.labETitle.Visible = true;
                    this.labETitle.Text = "<br><br><table  cellSpacing=0 cellPadding=4  border='1' bordercolordark='#ffffff' bordercolorlight='#000000'><tr><td width=80 align='center'><b>评分人</b></td><td width=60 align='center'><b>得分</b></td></tr><tr><td width=80 align='center'>&nbsp; &nbsp;</td><td width=60 align='center'>&nbsp; &nbsp;</td></tr></table><br><b>" + this.method_1(this.intTmp) + this.labETitle.Text + "</b>&nbsp;&nbsp;&nbsp;&nbsp;(共<font color='#ff0000'>" + strArray[4] + "</font>题,每题<font color='#ff0000'>" + strArray3[4] + "</font>分,说明:" + strArray2[4] + ")<br><br>";
                    this.method_8(str9);
                }
                if (strArray[5] != "0")
                {
                    this.intTmp++;
                    this.labFTitle.Visible = true;
                    this.labFTitle.Text = "<br><br><table  cellSpacing=0 cellPadding=4  border='1' bordercolordark='#ffffff' bordercolorlight='#000000'><tr><td width=80 align='center'><b>评分人</b></td><td width=60 align='center'><b>得分</b></td></tr><tr><td width=80 align='center'>&nbsp; &nbsp;</td><td width=60 align='center'>&nbsp; &nbsp;</td></tr></table><br><b>" + this.method_1(this.intTmp) + this.labFTitle.Text + "</b>&nbsp;&nbsp;&nbsp;&nbsp;(共<font color='#ff0000'>" + strArray[5] + "</font>题,每题<font color='#ff0000'>" + strArray3[5] + "</font>分,说明:" + strArray2[5] + ")<br><br>";
                    this.method_9(str10);
                }
                if (strArray[6] != "0")
                {
                    this.intTmp++;
                    this.labGTitle.Visible = true;
                    this.labGTitle.Text = "<br><br><table  cellSpacing=0 cellPadding=4  border='1' bordercolordark='#ffffff' bordercolorlight='#000000'><tr><td width=80 align='center'><b>评分人</b></td><td width=60 align='center'><b>得分</b></td></tr><tr><td width=80 align='center'>&nbsp; &nbsp;</td><td width=60 align='center'>&nbsp; &nbsp;</td></tr></table><br><b>" + this.method_1(this.intTmp) + this.labGTitle.Text + "</b>&nbsp;&nbsp;&nbsp;&nbsp;(共<font color='#ff0000'>" + strArray[6] + "</font>题,每题<font color='#ff0000'>" + strArray3[6] + "</font>分,说明:" + strArray2[6] + ")<br><br>";
                    this.method_10(str11);
                }
                if (strArray[7] != "0")
                {
                    this.intTmp++;
                    this.labHTitle.Visible = true;
                    this.labHTitle.Text = "<br><br><table  cellSpacing=0 cellPadding=4  border='1' bordercolordark='#ffffff' bordercolorlight='#000000'><tr><td width=80 align='center'><b>评分人</b></td><td width=60 align='center'><b>得分</b></td></tr><tr><td width=80 align='center'>&nbsp; &nbsp;</td><td width=60 align='center'>&nbsp; &nbsp;</td></tr></table><br><b>" + this.method_1(this.intTmp) + this.labHTitle.Text + "</b>&nbsp;&nbsp;&nbsp;&nbsp;(共<font color='#ff0000'>" + strArray[7] + "</font>题,每题<font color='#ff0000'>" + strArray3[7] + "</font>分,说明:" + strArray2[7] + ")<br><br>";
                    this.method_11(str12);
                }
                if (strArray[8] != "0")
                {
                    this.intTmp++;
                    this.labITitle.Visible = true;
                    this.labITitle.Text = "<br><br><table  cellSpacing=0 cellPadding=4  border='1' bordercolordark='#ffffff' bordercolorlight='#000000'><tr><td width=80 align='center'><b>评分人</b></td><td width=60 align='center'><b>得分</b></td></tr><tr><td width=80 align='center'>&nbsp; &nbsp;</td><td width=60 align='center'>&nbsp; &nbsp;</td></tr></table><br><b>" + this.method_1(this.intTmp) + this.labITitle.Text + "</b>&nbsp;&nbsp;&nbsp;&nbsp;(共<font color='#ff0000'>" + strArray[8] + "</font>题,每题<font color='#ff0000'>" + strArray3[8] + "</font>分,说明:" + strArray2[8] + ")<br><br>";
                    this.method_12(str13);
                }
                if (strArray[9] != "0")
                {
                    this.intTmp++;
                    this.labJTitle.Visible = true;
                    this.labJTitle.Text = string.Concat(new object[] { "<br><br><table  cellSpacing=0 cellPadding=4  border='1' bordercolordark='#ffffff' bordercolorlight='#000000'><tr><td width=80 align='center'><b>评分人</b></td><td width=60 align='center'><b>得分</b></td></tr><tr><td width=80 align='center'>&nbsp; &nbsp;</td><td width=60 align='center'>&nbsp; &nbsp;</td></tr></table><br><b>", this.method_1(this.intTmp), this.labJTitle.Text, "</b>&nbsp;&nbsp;&nbsp;&nbsp;(共<font color='#ff0000'>", strArray[9].Split(new char[] { '_' }).Length, "</font>题,说明:", strArray2[9], ")<br><br>" });
                    this.method_13(str14, strArray3[9]);
                }
            }
        }

        private void method_4(string string_0)
        {
            int num2;
            this.DataGridA.Visible = true;
            int num = 0;
            string str = "Select ID,SubjectID,RubricType,RubricTitle,OptionAnswer from RubricInfo ";
            string str2 = "";
            string[] strArray = string_0.Split(new char[] { '#' });
            if (strArray.Length > 0)
            {
                for (num2 = 0; num2 < strArray.Length; num2++)
                {
                    if (str2.Length <= 0)
                    {
                        str2 = " where ID='" + strArray[num2] + "'";
                    }
                    else
                    {
                        str2 = str2 + " or ID='" + strArray[num2] + "'";
                    }
                }
            }
            SqlConnection selectConnection = new SqlConnection(ConfigurationManager.ConnectionStrings["Conn"].ConnectionString);
            SqlDataAdapter adapter = new SqlDataAdapter(str + str2, selectConnection);
            DataSet dataSet = new DataSet();
            adapter.Fill(dataSet, "SRubric");
            this.DataGridA.DataSource = dataSet.Tables["SRubric"].DefaultView;
            this.DataGridA.DataBind();
            for (num2 = 0; num2 < this.DataGridA.Rows.Count; num2++)
            {
                num++;
                string[] strArray2 = dataSet.Tables["SRubric"].Rows[num2]["OptionAnswer"].ToString().Split(new char[] { '#' });
                Label label2 = (Label) this.DataGridA.Rows[num2].FindControl("labADataTitle");
                label2.Text = num.ToString() + "、" + label2.Text.ToString();
                Label label = (Label) this.DataGridA.Rows[num2].FindControl("labChooseDataA");
                if (strArray2[0].Trim() != "")
                {
                    label.Text = label.Text + "<br>A、" + strArray2[0];
                }
                if (strArray2[1].Trim() != "")
                {
                    label.Text = label.Text + "<br>B、" + strArray2[1];
                }
                if (strArray2[2].Trim() != "")
                {
                    label.Text = label.Text + "<br>C、" + strArray2[2];
                }
                if (strArray2[3].Trim() != "")
                {
                    label.Text = label.Text + "<br>D、" + strArray2[3];
                }
                if (strArray2[4].Trim() != "")
                {
                    label.Text = label.Text + "<br>E、" + strArray2[4];
                }
                if (strArray2[5].Trim() != "")
                {
                    label.Text = label.Text + "<br>F、" + strArray2[5];
                }
            }
            adapter.Dispose();
            dataSet.Clear();
            dataSet.Dispose();
            selectConnection.Close();
            selectConnection.Dispose();
        }

        private void method_5(string string_0)
        {
            int num2;
            this.DataGridB.Visible = true;
            int num = 0;
            string str = "Select ID,SubjectID,RubricType,RubricTitle,OptionAnswer  from RubricInfo ";
            string str2 = "";
            string[] strArray = string_0.Split(new char[] { '#' });
            if (strArray.Length > 0)
            {
                for (num2 = 0; num2 < strArray.Length; num2++)
                {
                    if (str2.Length > 0)
                    {
                        str2 = str2 + " or ID='" + strArray[num2] + "'";
                    }
                    else
                    {
                        str2 = " where ID='" + strArray[num2] + "'";
                    }
                }
            }
            SqlConnection selectConnection = new SqlConnection(ConfigurationManager.ConnectionStrings["Conn"].ConnectionString);
            SqlDataAdapter adapter = new SqlDataAdapter(str + str2, selectConnection);
            DataSet dataSet = new DataSet();
            adapter.Fill(dataSet, "DRubric");
            this.DataGridB.DataSource = dataSet.Tables["DRubric"].DefaultView;
            this.DataGridB.DataBind();
            for (num2 = 0; num2 < this.DataGridB.Rows.Count; num2++)
            {
                num++;
                string[] strArray2 = dataSet.Tables["DRubric"].Rows[num2]["OptionAnswer"].ToString().Split(new char[] { '#' });
                Label label2 = (Label) this.DataGridB.Rows[num2].FindControl("labBDataTitle");
                label2.Text = num.ToString() + "、" + label2.Text.ToString();
                Label label = (Label) this.DataGridB.Rows[num2].FindControl("labChooseDataB");
                if (strArray2[0].Trim() != "")
                {
                    label.Text = label.Text + "<br>A、" + strArray2[0];
                }
                if (strArray2[1].Trim() != "")
                {
                    label.Text = label.Text + "<br>B、" + strArray2[1];
                }
                if (strArray2[2].Trim() != "")
                {
                    label.Text = label.Text + "<br>C、" + strArray2[2];
                }
                if (strArray2[3].Trim() != "")
                {
                    label.Text = label.Text + "<br>D、" + strArray2[3];
                }
                if (strArray2[4].Trim() != "")
                {
                    label.Text = label.Text + "<br>E、" + strArray2[4];
                }
                if (strArray2[5].Trim() != "")
                {
                    label.Text = label.Text + "<br>F、" + strArray2[5];
                }
            }
            adapter.Dispose();
            dataSet.Clear();
            dataSet.Dispose();
            selectConnection.Close();
            selectConnection.Dispose();
        }

        private void method_6(string string_0)
        {
            int num2;
            this.DataGridC.Visible = true;
            int num = 0;
            string str = "Select ID,SubjectID,RubricType,RubricTitle,OptionAnswer  from RubricInfo ";
            string str2 = "";
            string[] strArray = string_0.Split(new char[] { '#' });
            if (strArray.Length > 0)
            {
                for (num2 = 0; num2 < strArray.Length; num2++)
                {
                    if (str2.Length <= 0)
                    {
                        str2 = " where ID='" + strArray[num2] + "'";
                    }
                    else
                    {
                        str2 = str2 + " or ID='" + strArray[num2] + "'";
                    }
                }
            }
            SqlConnection selectConnection = new SqlConnection(ConfigurationManager.ConnectionStrings["Conn"].ConnectionString);
            SqlDataAdapter adapter = new SqlDataAdapter(str + str2, selectConnection);
            DataSet dataSet = new DataSet();
            adapter.Fill(dataSet, "BRubric");
            this.DataGridC.DataSource = dataSet.Tables["BRubric"].DefaultView;
            this.DataGridC.DataBind();
            for (num2 = 0; num2 < this.DataGridC.Rows.Count; num2++)
            {
                num++;
                Label label = (Label) this.DataGridC.Rows[num2].FindControl("labCDataTitle");
                label.Text = num.ToString() + "、" + label.Text.ToString();
                Label label2 = (Label) this.DataGridC.Rows[num2].FindControl("labChooseDataC");
                label2.Text = "<br>正确<br>错误";
            }
            adapter.Dispose();
            dataSet.Clear();
            dataSet.Dispose();
            selectConnection.Close();
            selectConnection.Dispose();
        }

        private void method_7(string string_0)
        {
            int num2;
            this.DataGridD.Visible = true;
            int num = 0;
            string str = "Select ID,SubjectID,RubricType,RubricTitle,OptionAnswer  from RubricInfo ";
            string str2 = "";
            string[] strArray = string_0.Split(new char[] { '#' });
            if (strArray.Length > 0)
            {
                for (num2 = 0; num2 < strArray.Length; num2++)
                {
                    if (str2.Length <= 0)
                    {
                        str2 = " where ID='" + strArray[num2] + "'";
                    }
                    else
                    {
                        str2 = str2 + " or ID='" + strArray[num2] + "'";
                    }
                }
            }
            SqlConnection selectConnection = new SqlConnection(ConfigurationManager.ConnectionStrings["Conn"].ConnectionString);
            SqlDataAdapter adapter = new SqlDataAdapter(str + str2, selectConnection);
            DataSet dataSet = new DataSet();
            adapter.Fill(dataSet, "FRubric");
            this.DataGridD.DataSource = dataSet.Tables["FRubric"].DefaultView;
            this.DataGridD.DataBind();
            for (num2 = 0; num2 < this.DataGridD.Rows.Count; num2++)
            {
                num++;
                Label label2 = (Label) this.DataGridD.Rows[num2].FindControl("labDDataTitle");
                Label label = (Label) this.DataGridD.Rows[num2].FindControl("labChooseDataD");
                switch (label2.Text.ToString().Replace("___", "＃").Split(new char[] { '＃' }).Length)
                {
                    case 1:
                        label.Text = "";
                        break;

                    case 2:
                        label.Text = "___________";
                        break;

                    case 3:
                        label.Text = "___________、___________";
                        break;

                    case 4:
                        label.Text = "___________、___________、___________";
                        break;

                    case 5:
                        label.Text = "___________、___________、___________、___________";
                        break;

                    case 6:
                        label.Text = "___________、___________、___________、___________、___________";
                        break;

                    case 7:
                        label.Text = "___________、___________、___________、___________、___________、___________";
                        break;
                }
                label2.Text = num.ToString() + "、" + label2.Text.ToString();
            }
            adapter.Dispose();
            dataSet.Clear();
            dataSet.Dispose();
            selectConnection.Close();
            selectConnection.Dispose();
        }

        private void method_8(string string_0)
        {
            int num2;
            this.DataGridE.Visible = true;
            int num = 0;
            string str = "Select ID,SubjectID,RubricType,RubricTitle,OptionAnswer  from RubricInfo ";
            string str2 = "";
            string[] strArray = string_0.Split(new char[] { '#' });
            if (strArray.Length > 0)
            {
                for (num2 = 0; num2 < strArray.Length; num2++)
                {
                    if (str2.Length <= 0)
                    {
                        str2 = " where ID='" + strArray[num2] + "'";
                    }
                    else
                    {
                        str2 = str2 + " or ID='" + strArray[num2] + "'";
                    }
                }
            }
            SqlConnection selectConnection = new SqlConnection(ConfigurationManager.ConnectionStrings["Conn"].ConnectionString);
            SqlDataAdapter adapter = new SqlDataAdapter(str + str2, selectConnection);
            DataSet dataSet = new DataSet();
            adapter.Fill(dataSet, "ARubric");
            this.DataGridE.DataSource = dataSet.Tables["ARubric"].DefaultView;
            this.DataGridE.DataBind();
            for (num2 = 0; num2 < this.DataGridE.Rows.Count; num2++)
            {
                num++;
                Label label = (Label) this.DataGridE.Rows[num2].FindControl("labEDataTitle");
                label.Text = num.ToString() + "、" + label.Text.ToString();
                Label label2 = (Label) this.DataGridE.Rows[num2].FindControl("labChooseDataE");
                label2.Text = "答：<br><br><br><br><br><br><br><br><br><br>";
            }
            adapter.Dispose();
            dataSet.Clear();
            dataSet.Dispose();
            selectConnection.Close();
            selectConnection.Dispose();
        }

        private void method_9(string string_0)
        {
            int num2;
            this.DataGridF.Visible = true;
            int num = 0;
            string str = "Select ID,SubjectID,RubricType,RubricTitle,OptionAnswer  from RubricInfo ";
            string str2 = "";
            string[] strArray = string_0.Split(new char[] { '#' });
            if (strArray.Length > 0)
            {
                for (num2 = 0; num2 < strArray.Length; num2++)
                {
                    if (str2.Length > 0)
                    {
                        str2 = str2 + " or ID='" + strArray[num2] + "'";
                    }
                    else
                    {
                        str2 = " where ID='" + strArray[num2] + "'";
                    }
                }
            }
            SqlConnection selectConnection = new SqlConnection(ConfigurationManager.ConnectionStrings["Conn"].ConnectionString);
            SqlDataAdapter adapter = new SqlDataAdapter(str + str2, selectConnection);
            DataSet dataSet = new DataSet();
            adapter.Fill(dataSet, "CRubric");
            this.DataGridF.DataSource = dataSet.Tables["CRubric"].DefaultView;
            this.DataGridF.DataBind();
            for (num2 = 0; num2 < this.DataGridF.Rows.Count; num2++)
            {
                num++;
                Label label = (Label) this.DataGridF.Rows[num2].FindControl("labFDataTitle");
                label.Text = num.ToString() + "、" + label.Text.ToString();
                Label label2 = (Label) this.DataGridF.Rows[num2].FindControl("labChooseDataF");
                label2.Text = "正文：<br><br><br><br><br><br><br><br><br><br>";
            }
            adapter.Dispose();
            dataSet.Clear();
            dataSet.Dispose();
            selectConnection.Close();
            selectConnection.Dispose();
        }

        protected void Page_Load(object sender, EventArgs e)
        {
            this.int_0 = Convert.ToInt32(base.Request["ID"].ToString());
            this.httpCookie_0 = new HttpCookie("ExamUserCode");
            this.httpCookie_0 = base.Request.Cookies["ExamUserCode"];
            this.httpCookie_1 = new HttpCookie("ExamUserName");
            this.httpCookie_1 = base.Request.Cookies["ExamUserName"];
            this.httpCookie_2 = new HttpCookie("ExamUserLevel");
            this.httpCookie_2 = base.Request.Cookies["ExamUserLevel"];
            this.httpCookie_3 = new HttpCookie("ExamDeptID");
            this.httpCookie_3 = base.Request.Cookies["ExamDeptID"];
            if ((this.httpCookie_0 != null) ? !(this.httpCookie_0.Value == "") : false)
            {
                base.Response.Cache.SetCacheability(HttpCacheability.NoCache);
                base.Response.Cache.SetNoStore();
                this.httpCookie_0.Value = this.publicFun_0.CheckString(base.Server.UrlDecode(this.httpCookie_0.Value));
                this.httpCookie_1.Value = this.publicFun_0.CheckString(base.Server.UrlDecode(this.httpCookie_1.Value));
                this.httpCookie_2.Value = this.publicFun_0.CheckString(base.Server.UrlDecode(this.httpCookie_2.Value));
                this.httpCookie_3.Value = this.publicFun_0.CheckString(base.Server.UrlDecode(this.httpCookie_3.Value));
                if (!base.IsPostBack)
                {
                    this.Page.Title = ConfigurationManager.ConnectionStrings["ProTitle"].ConnectionString;
                    if (this.publicFun_0.ReturnPaperData() != "Yes")
                    {
                        base.Response.Write("<script>alert('此版本暂未授权,请拔打(0)13870606104手机号进行授权！')</script>");
                    }
                    else if ((this.int_0 != 0) && (this.httpCookie_2.Value != "A"))
                    {
                        this.method_2();
                        this.method_3();
                        this.labHeadInfo.Text = "<table  cellSpacing=0 cellPadding=4 align='center' border='1' bordercolordark='#ffffff' bordercolorlight='#000000'>";
                        this.labHeadInfo.Text = this.labHeadInfo.Text + "<tr><td width=60 align='center'><b>题号</b></td>" + this.method_0("A") + "<td width=100 align='center'><b>合计</b></td><td width=100 align='center'><b>统分人</b></td></tr>";
                        this.labHeadInfo.Text = this.labHeadInfo.Text + "<tr><td width=60 align='center'><b>得分</b></td>" + this.method_0("B") + "<td width=100 align='center'>&nbsp; &nbsp;</td><td width=100 align='center'>&nbsp; &nbsp;</td></tr>";
                        this.labHeadInfo.Text = this.labHeadInfo.Text + "</table>";
                        base.Response.Write("<script>setTimeout(function(){ if (confirm('确定要打印试卷吗？')) { window.print();} },1000)</script>");
                    }
                }
            }
            else
            {
                base.Response.Write("<script language=javascript>top.location.href='../Index.htm';self.close();</script>");
            }
        }
    }
}

